package com.geeka.d12.work.chatroom;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;

public class ClientInputThread extends Thread {

    private Scanner scan;
    private PrintWriter pw;
    public ClientInputThread(Scanner scan , PrintWriter pw) {
        this.scan = scan;
        this.pw  = pw;
    }

    private BufferedReader br;
    String strInput;
    @Override
    public void run() {
        while (true){
            System.out.println("请输入要发送的信息: ");
            String next = scan.next();
            pw.println(next);
            pw.flush();

//            System.out.println(strInput);
        }
    }
}
